#!/bin/bash

read_date_from_file(){
   while read line;do
        start_date=$(echo $line | awk '{print $1}')
        end_date=$(echo $line | awk '{print $2}')
        echo "start_date=${start_date}"
        echo "end_date=${end_date}"
   done < date_list.txt;
};
watch_hbase_migration_task(){
   task_count=$(yarn app -list|  grep com.raylu.tools.HbaseMigrationOpt | grep -v  grep | wc -l)
   echo ${task_count}
   if [ 0 -lt $task_count ];then
      echo true;
   fi
};

read_date_from_file